package com.ken.app_manager.server;

import com.ken.app_manager.base.OnBaseCallback;
import com.ken.app_manager.bean.UserBean;
import com.ken.app_manager.dao.UserDao;
import com.ken.app_manager.dao.impl.UserDaoImplJdbc;

public class ControllerServerImpl implements ControllerServer {

    private UserDao userDao = new UserDaoImplJdbc();

    @Override
    public void register(UserBean userBean, OnBaseCallback callback) {

        userDao.create(userBean, new OnBaseCallback() {
            @Override
            public void onSuccess(String result) {
                callback.onSuccess(result);
            }

            @Override
            public void onError(int code, String message) {
                callback.onError(code, message);
            }
        });
    }

    @Override
    public void login(UserBean userBean) {

    }

    @Override
    public UserBean findUser(String pkid) {
        return null;
    }
}
